<h1>Listing bills</h1>

<table>
  <tr>
    <th>Customer</th>
    <th>Electrician</th>
    <th>On date</th>
    <th>Total amount</th>
    <th>Is cash bill</th>
    <th>Is new and one time customer</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @bills.each do |bill| %>
  <tr>
    <td><%= bill.customer_id %></td>
    <td><%= bill.electrician_id %></td>
    <td><%= bill.on_date %></td>
    <td><%= bill.total_amount %></td>
    <td><%= bill.is_cash_bill %></td>
    <td><%= bill.is_new_and_one_time_customer %></td>
    <td><%= link_to 'Show', bill %></td>
    <td><%= link_to 'Edit', edit_bill_path(bill) %></td>
    <td><%= link_to 'Destroy', bill, method: :delete, data: { confirm: 'Are you sure?' } %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Bill', new_bill_path %>
